home *** CD-ROM | disk | FTP | other *** search
/ Mac-Source 1994 July / Mac-Source_July_1994.iso / C and C++ / Compilers⁄Interps / GCC-2.3.3r12 / Sources / print-tree.c < prev    next >
Encoding:
C/C++ Source or Header  |  1993-05-06  |  17.6 KB  |  638 lines  |  [TEXT/MPS ]

  1. /* Prints out tree in human readable form - GNU C-compiler
  2.    Copyright (C) 1990, 1991 Free Software Foundation, Inc.
  3.  
  4. This file is part of GNU CC.
  5.  
  6. GNU CC is free software; you can redistribute it and/or modify
  7. it under the terms of the GNU General Public License as published by
  8. the Free Software Foundation; either version 2, or (at your option)
  9. any later version.
  10.  
  11. GNU CC is distributed in the hope that it will be useful,
  12. but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  14. GNU General Public License for more details.
  15.  
  16. You should have received a copy of the GNU General Public License
  17. along with GNU CC; see the file COPYING.  If not, write to
  18. the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
  19.  
  20.  
  21. #include "config.h"
  22. #include "tree.h"
  23. #include <stdio.h>
  24.  
  25. extern char **tree_code_name;
  26.  
  27. extern char *mode_name[];
  28.  
  29. void print_node ();
  30. void indent_to ();
  31.  
  32. /* Define the hash table of nodes already seen.
  33.    Such nodes are not repeated; brief cross-references are used.  */
  34.  
  35. #define HASH_SIZE 37
  36.  
  37. struct bucket
  38. {
  39.   tree node;
  40.   struct bucket *next;
  41. };
  42.  
  43. static struct bucket **table;
  44.  
  45. /* Print the node NODE on standard error, for debugging.
  46.    Most nodes referred to by this one are printed recursively
  47.    down to a depth of six.  */
  48.  
  49. void
  50. debug_tree (node)
  51.      tree node;
  52. {
  53.   char *object = (char *) oballoc (0);
  54.   table = (struct bucket **) oballoc (HASH_SIZE * sizeof (struct bucket *));
  55.   bzero (table, HASH_SIZE * sizeof (struct bucket *));
  56.   print_node (stderr, "", node, 0);
  57.   table = 0;
  58.   obfree (object);
  59.   fprintf (stderr, "\n");
  60. }
  61.  
  62. /* Print a node in brief fashion, with just the code, address and name.  */
  63.  
  64. void
  65. print_node_brief (file, prefix, node, indent)
  66.      FILE *file;
  67.      char *prefix;
  68.      tree node;
  69.      int indent;
  70. {
  71.   char class;
  72.  
  73.   if (node == 0)
  74.     return;
  75.  
  76.   class = TREE_CODE_CLASS (TREE_CODE (node));
  77.  
  78.   /* Always print the slot this node is in, and its code, address and
  79.      name if any.  */
  80.   if (indent > 0)
  81.     fprintf (file, " ");
  82.   fprintf (file, "%s <%s ", prefix, tree_code_name[(int) TREE_CODE (node)]);
  83.   fprintf (file, HOST_PTR_PRINTF, node);
  84.  
  85.   if (class == 'd')
  86.     {
  87.       if (DECL_NAME (node))
  88.     fprintf (file, " %s", IDENTIFIER_POINTER (DECL_NAME (node)));
  89.     }
  90.   else if (class == 't')
  91.     {
  92.       if (TYPE_NAME (node))
  93.     {
  94.       if (TREE_CODE (TYPE_NAME (node)) == IDENTIFIER_NODE)
  95.         fprintf (file, " %s", IDENTIFIER_POINTER (TYPE_NAME (node)));
  96.       else if (TREE_CODE (TYPE_NAME (node)) == TYPE_DECL
  97.            && DECL_NAME (TYPE_NAME (node)))
  98.         fprintf (file, " %s",
  99.              IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (node))));
  100.     }
  101.     }
  102.   if (TREE_CODE (node) == IDENTIFIER_NODE)
  103.     fprintf (file, " %s", IDENTIFIER_POINTER (node));
  104.   /* We might as well always print the value of an integer.  */
  105.   if (TREE_CODE (node) == INTEGER_CST)
  106.     {
  107.       if (TREE_INT_CST_HIGH (node) == 0)
  108.     fprintf (file, " %1u", TREE_INT_CST_LOW (node));
  109.       else if (TREE_INT_CST_HIGH (node) == -1
  110.            && TREE_INT_CST_LOW (node) != 0)
  111.     fprintf (file, " -%1u", -TREE_INT_CST_LOW (node));
  112.       else
  113.     fprintf (file,
  114. #if HOST_BITS_PER_WIDE_INT == 64
  115. #if HOST_BITS_PER_WIDE_INT != HOST_BITS_PER_INT
  116.          " 0x%lx%016lx",
  117. #else
  118.          " 0x%x%016x",
  119. #endif
  120. #else
  121. #if HOST_BITS_PER_WIDE_INT != HOST_BITS_PER_INT
  122.          " 0x%lx%08lx",
  123. #else
  124.          " 0x%x%08x",
  125. #endif
  126. #endif
  127.          TREE_INT_CST_HIGH (node), TREE_INT_CST_LOW (node));
  128.     }
  129.   if (TREE_CODE (node) == REAL_CST)
  130.     {
  131. #ifndef REAL_IS_NOT_DOUBLE
  132.       fprintf (file, " %e", TREE_REAL_CST (node));
  133. #else
  134.       {
  135.     int i;
  136.     char *p = (char *) &TREE_REAL_CST (node);
  137.     fprintf (file, " 0x");
  138.     for (i = 0; i < sizeof TREE_REAL_CST (node); i++)
  139.       fprintf (file, "%02x", *p++);
  140.     fprintf (file, "");
  141.       }
  142. #endif /* REAL_IS_NOT_DOUBLE */
  143.     }
  144.  
  145.   fprintf (file, ">");
  146. }
  147.  
  148. void
  149. indent_to (file, column)
  150.      FILE *file;
  151.      int column;
  152. {
  153.   int i;
  154.  
  155.   /* Since this is the long way, indent to desired column.  */
  156.   if (column > 0)
  157.     fprintf (file, "\n");
  158.   for (i = 0; i < column; i++)
  159.     fprintf (file, " ");
  160. }
  161.  
  162. /* Print the node NODE in full on file FILE, preceded by PREFIX,
  163.    starting in column INDENT.  */
  164.  
  165. void
  166. print_node (file, prefix, node, indent)
  167.      FILE *file;
  168.      char *prefix;
  169.      tree node;
  170.      int indent;
  171. {
  172.   int hash;
  173.   struct bucket *b;
  174.   enum machine_mode mode;
  175.   char class;
  176.   int len;
  177.   int first_rtl;
  178.   int i;
  179.  
  180.   if (node == 0)
  181.     return;
  182.  
  183.   class = TREE_CODE_CLASS (TREE_CODE (node));
  184.  
  185.   /* Don't get too deep in nesting.  If the user wants to see deeper,
  186.      it is easy to use the address of a lowest-level node
  187.      as an argument in another call to debug_tree.  */
  188.  
  189.   if (indent > 24)
  190.     {
  191.       print_node_brief (file, prefix, node, indent);
  192.       return;
  193.     }
  194.  
  195.   if (indent > 8 && (class == 't' || class == 'd'))
  196.     {
  197.       print_node_brief (file, prefix, node, indent);
  198.       return;
  199.     }
  200.  
  201.   /* It is unsafe to look at any other filds of an ERROR_MARK node. */
  202.   if (TREE_CODE (node) == ERROR_MARK)
  203.     {
  204.       print_node_brief (file, prefix, node, indent);
  205.       return;
  206.     }
  207.  
  208.   hash = ((unsigned HOST_WIDE_INT) node) % HASH_SIZE;
  209.  
  210.   /* If node is in the table, just mention its address.  */
  211.   for (b = table[hash]; b; b = b->next)
  212.     if (b->node == node)
  213.       {
  214.     print_node_brief (file, prefix, node, indent);
  215.     return;
  216.       }
  217.  
  218.   /* Add this node to the table.  */
  219.   b = (struct bucket *) oballoc (sizeof (struct bucket));
  220.   b->node = node;
  221.   b->next = table[hash];
  222.   table[hash] = b;
  223.  
  224.   /* Indent to the specified column, since this is the long form.  */
  225.   indent_to (file, indent);
  226.  
  227.   /* Print the slot this node is in, and its code, and address.  */
  228.   fprintf (file, "%s <%s ", prefix, tree_code_name[(int) TREE_CODE (node)]);
  229.   fprintf (file, HOST_PTR_PRINTF, node);
  230.  
  231.   /* Print the name, if any.  */
  232.   if (class == 'd')
  233.     {
  234.       if (DECL_NAME (node))
  235.     fprintf (file, " %s", IDENTIFIER_POINTER (DECL_NAME (node)));
  236.     }
  237.   else if (class == 't')
  238.     {
  239.       if (TYPE_NAME (node))
  240.     {
  241.       if (TREE_CODE (TYPE_NAME (node)) == IDENTIFIER_NODE)
  242.         fprintf (file, " %s", IDENTIFIER_POINTER (TYPE_NAME (node)));
  243.       else if (TREE_CODE (TYPE_NAME (node)) == TYPE_DECL
  244.            && DECL_NAME (TYPE_NAME (node)))
  245.         fprintf (file, " %s",
  246.              IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (node))));
  247.     }
  248.     }
  249.   if (TREE_CODE (node) == IDENTIFIER_NODE)
  250.     fprintf (file, " %s", IDENTIFIER_POINTER (node));
  251.  
  252.   if (TREE_CODE (node) == INTEGER_CST)
  253.     {
  254.       if (indent <= 4)
  255.     print_node_brief (file, "type", TREE_TYPE (node), indent + 4);
  256.     }
  257.   else
  258.     {
  259.       print_node (file, "type", TREE_TYPE (node), indent + 4);
  260.       if (TREE_TYPE (node))
  261.     indent_to (file, indent + 3);
  262.     }
  263.  
  264.   /* If a permanent object is in the wrong obstack, or the reverse, warn.  */
  265.   if (object_permanent_p (node) != TREE_PERMANENT (node))
  266.     {
  267.       if (TREE_PERMANENT (node))
  268.     fputs (" !!permanent object in non-permanent obstack!!", file);
  269.       else
  270.     fputs (" !!non-permanent object in permanent obstack!!", file);
  271.       indent_to (file, indent + 3);
  272.     }
  273.  
  274.   if (TREE_SIDE_EFFECTS (node))
  275.     fputs (" side-effects", file);
  276.   if (TREE_READONLY (node))
  277.     fputs (" readonly", file);
  278.   if (TREE_CONSTANT (node))
  279.     fputs (" constant", file);
  280.   if (TREE_ADDRESSABLE (node))
  281.     fputs (" addressable", file);
  282.   if (TREE_THIS_VOLATILE (node))
  283.     fputs (" volatile", file);
  284.   if (TREE_UNSIGNED (node))
  285.     fputs (" unsigned", file);
  286.   if (TREE_ASM_WRITTEN (node))
  287.     fputs (" asm_written", file);
  288.   if (TREE_USED (node))
  289.     fputs (" used", file);
  290.   if (TREE_RAISES (node))
  291.     fputs (" raises", file);
  292.   if (TREE_PERMANENT (node))
  293.     fputs (" permanent", file);
  294.   if (TREE_PUBLIC (node))
  295.     fputs (" public", file);
  296.   if (TREE_STATIC (node))
  297.     fputs (" static", file);
  298.   if (TREE_LANG_FLAG_0 (node))
  299.     fputs (" tree_0", file);
  300.   if (TREE_LANG_FLAG_1 (node))
  301.     fputs (" tree_1", file);
  302.   if (TREE_LANG_FLAG_2 (node))
  303.     fputs (" tree_2", file);
  304.   if (TREE_LANG_FLAG_3 (node))
  305.     fputs (" tree_3", file);
  306.   if (TREE_LANG_FLAG_4 (node))
  307.     fputs (" tree_4", file);
  308.   if (TREE_LANG_FLAG_5 (node))
  309.     fputs (" tree_5", file);
  310.   if (TREE_LANG_FLAG_6 (node))
  311.     fputs (" tree_6", file);
  312.   /* Recognize and print declarations of pascal and direct functions. */
  313.   if (TREE_PASCAL (node))
  314.     fputs (" pascal", file);
  315.   if (TREE_DIRECT (node))
  316.     fputs (" direct", file);
  317.  
  318.   /* DECL_ nodes have additional attributes.  */
  319.  
  320.   switch (TREE_CODE_CLASS (TREE_CODE (node)))
  321.     {
  322.     case 'd':
  323.       mode = DECL_MODE (node);
  324.  
  325.       if (DECL_EXTERNAL (node))
  326.     fputs (" external", file);
  327.       if (DECL_NONLOCAL (node))
  328.     fputs (" nonlocal", file);
  329.       if (DECL_REGISTER (node))
  330.     fputs (" regdecl", file);
  331.       if (DECL_INLINE (node))
  332.     fputs (" inline", file);
  333.       if (DECL_BIT_FIELD (node))
  334.     fputs (" bit-field", file);
  335.       if (DECL_VIRTUAL_P (node))
  336.     fputs (" virtual", file);
  337.       if (DECL_IGNORED_P (node))
  338.     fputs (" ignored", file);
  339.       if (DECL_IN_SYSTEM_HEADER (node))
  340.     fputs (" in_system_header", file);
  341.       if (DECL_LANG_FLAG_0 (node))
  342.     fputs (" decl_0", file);
  343.       if (DECL_LANG_FLAG_1 (node))
  344.     fputs (" decl_1", file);
  345.       if (DECL_LANG_FLAG_2 (node))
  346.     fputs (" decl_2", file);
  347.       if (DECL_LANG_FLAG_3 (node))
  348.     fputs (" decl_3", file);
  349.       if (DECL_LANG_FLAG_4 (node))
  350.     fputs (" decl_4", file);
  351.       if (DECL_LANG_FLAG_5 (node))
  352.     fputs (" decl_5", file);
  353.       if (DECL_LANG_FLAG_6 (node))
  354.     fputs (" decl_6", file);
  355.       if (DECL_LANG_FLAG_7 (node))
  356.     fputs (" decl_7", file);
  357.  
  358.       fprintf (file, " %s", mode_name[(int) mode]);
  359.  
  360.       fprintf (file, " file %s line %d",
  361.            DECL_SOURCE_FILE (node), DECL_SOURCE_LINE (node));
  362.  
  363.       print_node (file, "size", DECL_SIZE (node), indent + 4);
  364.       indent_to (file, indent + 3);
  365.       if (TREE_CODE (node) != FUNCTION_DECL)
  366.     fprintf (file, " align %d", DECL_ALIGN (node));
  367.       else if (DECL_INLINE (node))
  368.     fprintf (file, " frame_size %d", DECL_FRAME_SIZE (node));
  369.       else if (DECL_BUILT_IN (node))
  370.     fprintf (file, " built-in code %d", DECL_FUNCTION_CODE (node));
  371.       if (TREE_CODE (node) == FIELD_DECL)
  372.     print_node (file, "bitpos", DECL_FIELD_BITPOS (node), indent + 4);
  373.       print_node_brief (file, "context", DECL_CONTEXT (node), indent + 4);
  374.       print_node_brief (file, "abstract_origin",
  375.             DECL_ABSTRACT_ORIGIN (node), indent + 4);
  376.  
  377.       print_node (file, "arguments", DECL_ARGUMENTS (node), indent + 4);
  378.       print_node (file, "result", DECL_RESULT (node), indent + 4);
  379.       print_node_brief (file, "initial", DECL_INITIAL (node), indent + 4);
  380.  
  381.       print_lang_decl (file, node, indent);
  382.  
  383.       if (DECL_RTL (node) != 0)
  384.     {
  385.       indent_to (file, indent + 4);
  386.       print_rtl (file, DECL_RTL (node));
  387.     }
  388.  
  389.       if (DECL_SAVED_INSNS (node) != 0)
  390.     {
  391.       indent_to (file, indent + 4);
  392.       if (TREE_CODE (node) == PARM_DECL)
  393.         {
  394.           fprintf (file, "incoming-rtl ");
  395.           print_rtl (file, DECL_INCOMING_RTL (node));
  396.         }
  397.       else if (TREE_CODE (node) == FUNCTION_DECL)
  398.         {
  399.           fprintf (file, "saved-insns ");
  400.           fprintf (file, HOST_PTR_PRINTF, DECL_SAVED_INSNS (node));
  401.         }
  402.     }
  403.  
  404.       /* Print the decl chain only if decl is at second level.  */
  405.       if (indent == 4)
  406.     print_node (file, "chain", TREE_CHAIN (node), indent + 4);
  407.       else
  408.     print_node_brief (file, "chain", TREE_CHAIN (node), indent + 4);
  409.       break;
  410.  
  411.     case 't':
  412.       if (TYPE_NO_FORCE_BLK (node))
  413.     fputs (" no_force_blk", file);
  414.       if (TYPE_LANG_FLAG_0 (node))
  415.     fputs (" type_0", file);
  416.       if (TYPE_LANG_FLAG_1 (node))
  417.     fputs (" type_1", file);
  418.       if (TYPE_LANG_FLAG_2 (node))
  419.     fputs (" type_2", file);
  420.       if (TYPE_LANG_FLAG_3 (node))
  421.     fputs (" type_3", file);
  422.       if (TYPE_LANG_FLAG_4 (node))
  423.     fputs (" type_4", file);
  424.       if (TYPE_LANG_FLAG_5 (node))
  425.     fputs (" type_5", file);
  426.       if (TYPE_LANG_FLAG_6 (node))
  427.     fputs (" type_6", file);
  428.  
  429.       mode = TYPE_MODE (node);
  430.       fprintf (file, " %s", mode_name[(int) mode]);
  431.  
  432.       print_node (file, "size", TYPE_SIZE (node), indent + 4);
  433.       indent_to (file, indent + 3);
  434.  
  435.       fprintf (file, " align %d", TYPE_ALIGN (node));
  436.       fprintf (file, " symtab %d", TYPE_SYMTAB_ADDRESS (node));
  437.  
  438.       if (TREE_CODE (node) == ARRAY_TYPE || TREE_CODE (node) == SET_TYPE)
  439.     print_node (file, "domain", TYPE_DOMAIN (node), indent + 4);
  440.       else if (TREE_CODE (node) == INTEGER_TYPE
  441.            || TREE_CODE (node) == BOOLEAN_TYPE
  442.            || TREE_CODE (node) == CHAR_TYPE)
  443.     {
  444.       fprintf (file, " precision %d", TYPE_PRECISION (node));
  445.       print_node (file, "min", TYPE_MIN_VALUE (node), indent + 4);
  446.       print_node (file, "max", TYPE_MAX_VALUE (node), indent + 4);
  447.     }
  448.       else if (TREE_CODE (node) == ENUMERAL_TYPE)
  449.     {
  450.       fprintf (file, " precision %d", TYPE_PRECISION (node));
  451.       print_node (file, "min", TYPE_MIN_VALUE (node), indent + 4);
  452.       print_node (file, "max", TYPE_MAX_VALUE (node), indent + 4);
  453.       print_node (file, "values", TYPE_VALUES (node), indent + 4);
  454.     }
  455.       else if (TREE_CODE (node) == REAL_TYPE)
  456.     fprintf (file, " precision %d", TYPE_PRECISION (node));
  457.       else if (TREE_CODE (node) == RECORD_TYPE || TREE_CODE (node) == UNION_TYPE)
  458.     print_node (file, "fields", TYPE_FIELDS (node), indent + 4);
  459.       else if (TREE_CODE (node) == FUNCTION_TYPE || TREE_CODE (node) == METHOD_TYPE)
  460.     {
  461.       if (TYPE_METHOD_BASETYPE (node))
  462.         print_node_brief (file, "method basetype", TYPE_METHOD_BASETYPE (node), indent + 4);
  463.       print_node (file, "arg-types", TYPE_ARG_TYPES (node), indent + 4);
  464.       /* Display the calling convention, if defined. */
  465.       if (TYPE_CALL_CONVENTION (node))
  466.         {
  467.           indent_to (file, indent + 3);
  468. #ifdef PRINT_CALL_CONVENTION
  469.           PRINT_CALL_CONVENTION (file, node, indent);
  470. #else
  471.           fprintf(file, " special call convention");
  472. #endif
  473.         }
  474.     }
  475.       if (TYPE_CONTEXT (node))
  476.     print_node_brief (file, "context", TYPE_CONTEXT (node), indent + 4);
  477.  
  478.       print_lang_type (file, node, indent);
  479.  
  480.       if (TYPE_POINTER_TO (node) || TREE_CHAIN (node))
  481.     indent_to (file, indent + 3);
  482.       print_node_brief (file, "pointer_to_this", TYPE_POINTER_TO (node), indent + 4);
  483.       print_node_brief (file, "reference_to_this", TYPE_REFERENCE_TO (node), indent + 4);
  484.       print_node_brief (file, "chain", TREE_CHAIN (node), indent + 4);
  485.       break;
  486.  
  487.     case 'b':
  488.       print_node (file, "vars", BLOCK_VARS (node), indent + 4);
  489.       print_node (file, "tags", BLOCK_TYPE_TAGS (node), indent + 4);
  490.       print_node (file, "supercontext", BLOCK_SUPERCONTEXT (node), indent + 4);
  491.       print_node (file, "subblocks", BLOCK_SUBBLOCKS (node), indent + 4);
  492.       print_node (file, "chain", BLOCK_CHAIN (node), indent + 4);
  493.       print_node (file, "abstract_origin",
  494.           BLOCK_ABSTRACT_ORIGIN (node), indent + 4);
  495.       return;
  496.  
  497.     case 'e':
  498.     case '<':
  499.     case '1':
  500.     case '2':
  501.     case 'r':
  502.     case 's':
  503.       switch (TREE_CODE (node))
  504.     {
  505.     case BIND_EXPR:
  506.       print_node (file, "vars", TREE_OPERAND (node, 0), indent + 4);
  507.       print_node (file, "body", TREE_OPERAND (node, 1), indent + 4);
  508.       print_node (file, "block", TREE_OPERAND (node, 2), indent + 4);
  509.       return;
  510.     }
  511.  
  512.       first_rtl = len = tree_code_length[(int) TREE_CODE (node)];
  513.       /* These kinds of nodes contain rtx's, not trees,
  514.      after a certain point.  Print the rtx's as rtx's.  */
  515.       switch (TREE_CODE (node))
  516.     {
  517.     case SAVE_EXPR:
  518.       first_rtl = 2;
  519.       break;
  520.     case CALL_EXPR:
  521.       first_rtl = 2;
  522.       break;
  523.     case METHOD_CALL_EXPR:
  524.       first_rtl = 3;
  525.       break;
  526.     case WITH_CLEANUP_EXPR:
  527.       /* Should be defined to be 2.  */
  528.       first_rtl = 1;
  529.       break;
  530.     case RTL_EXPR:
  531.       first_rtl = 0;
  532.     }
  533.       for (i = 0; i < len; i++)
  534.     {
  535.       if (i >= first_rtl)
  536.         {
  537.           indent_to (file, indent + 4);
  538.           fprintf (file, "rtl %d ", i);
  539.           if (TREE_OPERAND (node, i))
  540.         print_rtl (file, TREE_OPERAND (node, i));
  541.           else
  542.         fprintf (file, "(nil)");
  543.           fprintf (file, "\n");
  544.         }
  545.       else
  546.         {
  547.           char temp[10];
  548.  
  549.           sprintf (temp, "arg %d", i);
  550.           print_node (file, temp, TREE_OPERAND (node, i), indent + 4);
  551.         }
  552.     }
  553.       break;
  554.  
  555.     case 'c':
  556.     case 'x':
  557.       switch (TREE_CODE (node))
  558.     {
  559.     case INTEGER_CST:
  560.       if (TREE_INT_CST_HIGH (node) == 0)
  561.         fprintf (file, " %1u", TREE_INT_CST_LOW (node));
  562.       else if (TREE_INT_CST_HIGH (node) == -1
  563.            && TREE_INT_CST_LOW (node) != 0)
  564.         fprintf (file, " -%1u", -TREE_INT_CST_LOW (node));
  565.       else
  566.         fprintf (file,
  567. #if HOST_BITS_PER_WIDE_INT == 64
  568. #if HOST_BITS_PER_WIDE_INT != HOST_BITS_PER_INT
  569.              " 0x%lx%016lx",
  570. #else
  571.              " 0x%x%016x",
  572. #endif
  573. #else
  574. #if HOST_BITS_PER_WIDE_INT != HOST_BITS_PER_INT
  575.              " 0x%lx%08lx",
  576. #else
  577.              " 0x%x%08x",
  578. #endif
  579. #endif
  580.              TREE_INT_CST_HIGH (node), TREE_INT_CST_LOW (node));
  581.       break;
  582.  
  583.     case REAL_CST:
  584. #ifndef REAL_IS_NOT_DOUBLE
  585.       fprintf (file, " %e", TREE_REAL_CST (node));
  586. #else
  587.       {
  588.         char *p = (char *) &TREE_REAL_CST (node);
  589.         fprintf (file, " 0x");
  590.         for (i = 0; i < sizeof TREE_REAL_CST (node); i++)
  591.           fprintf (file, "%02x", *p++);
  592.         fprintf (file, "");
  593.       }
  594. #endif /* REAL_IS_NOT_DOUBLE */
  595.       break;
  596.  
  597.     case COMPLEX_CST:
  598.       print_node (file, "real", TREE_REALPART (node), indent + 4);
  599.       print_node (file, "imag", TREE_IMAGPART (node), indent + 4);
  600.       break;
  601.  
  602.     case STRING_CST:
  603.       fprintf (file, " \"%s\"", TREE_STRING_POINTER (node));
  604.       break;
  605.  
  606.     case IDENTIFIER_NODE:
  607.       print_lang_identifier (file, node, indent);
  608.       break;
  609.  
  610.     case TREE_LIST:
  611.       print_node (file, "purpose", TREE_PURPOSE (node), indent + 4);
  612.       print_node (file, "value", TREE_VALUE (node), indent + 4);
  613.       print_node (file, "chain", TREE_CHAIN (node), indent + 4);
  614.       break;
  615.  
  616.     case TREE_VEC:
  617.       len = TREE_VEC_LENGTH (node);
  618.       for (i = 0; i < len; i++)
  619.         if (TREE_VEC_ELT (node, i))
  620.           {
  621.         char temp[10];
  622.         sprintf (temp, "elt %d", i);
  623.         indent_to (file, indent + 4);
  624.         print_node_brief (file, temp, TREE_VEC_ELT (node, i), 0);
  625.           }
  626.       break;
  627.  
  628.     case OP_IDENTIFIER:
  629.       print_node (file, "op1", TREE_PURPOSE (node), indent + 4);
  630.       print_node (file, "op2", TREE_VALUE (node), indent + 4);
  631.     }
  632.  
  633.       break;
  634.     }
  635.  
  636.   fprintf (file, ">");
  637. }
  638.